import { Space } from 'antd';
import React from 'react';
import Avatar from './AvatarDropdown';
import styles from './index.less';
import {useModel} from "@@/plugin-model/useModel";

const GlobalHeaderRight: React.FC = () => {
  const { initialState } = useModel('@@initialState');

  if (!initialState || !initialState.settings) {
    return null;
  }

  const { navTheme, layout } = initialState.settings;
  let className = styles.right;

  if ((navTheme === 'dark' && layout === 'top') || layout === 'mix') {
    className = `${styles.right}  ${styles.dark}`;
  }

  // 提取当前用户数据
    return (
    <Space className={className}>
      {/*<span*/}
      {/*  className={styles.action}*/}
      {/*  onClick={() => {*/}
      {/*    window.open('https://pro.ant.design/docs/getting-started');*/}
      {/*  }}*/}
      {/*>*/}
      {/*  <QuestionCircleOutlined />*/}
      {/*</span>*/}

      <Avatar menu />
      {/*<SelectLang className={styles.action} />*/}
    </Space>
  );
};

export default GlobalHeaderRight;
